package com.blb.thread;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * 实现Runable的线程
 */
public class MyRunnable implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"正在执行"+i);
        }
    }

    public static void main(String[] args) {

        List<Integer> list = Arrays.asList(88, 89,2, 797, 44, 44, 6, 4);

        Collections.sort(list,(o1,o2)-> o1-o2);
        System.out.println(list);
    }
}
